<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 5.求数组 [71,22,63,34,15] 中的偶数个数，并且输出结果
        let arr = [71, 22, 63, 34, 15]
        let newArr = []
        for (let i of arr.keys()) {
            if (arr[i] % 2 === 0) {
                newArr.push(arr[i])
            }
        }
        console.log(`偶数数组长度${newArr.length}`)


    </script>
</body>

</html>